package exp2;
   
import junit.framework.TestCase;

public class ComplexTest extends TestCase {

    Complex a = new Complex(1,3);
    Complex b = new Complex(0,3);
    Complex c = new Complex(1,6);
    Complex d = new Complex(-9,3);
    Complex e = new Complex(1,1);
    Complex f = new Complex(1,1);
    Complex g = new Complex(1,0);

    @Test
    public void testComplexAdd() throws Exception{
        assertEquals(a.ComplexAdd(b).toString(),c.toString());
    }

    @Test
    public void testComplexSub() throws Exception{
        assertEquals(c.ComplexSub(b).toString(),a.toString());
    }

    @Test
    public void testComplexMulti() throws Exception{
        assertEquals(a.ComplexMulti(b).toString(),d.toString());
    }

    @Test
    public void testComplexDiv() throws Exception{
        assertEquals(e.ComplexDiv(f).toString(),g.toString());
    }
}
